import { Routes, Route, } from 'react-router-dom'
function RouteView(props) {
    const { routes } = props
    return (

        <Routes>
            {
                routes.map(item => {
                    return (
                        <Route key={item.path} path={item.path}
                            element={item.element} />
                    )
                })
            }
        </Routes>

    )

}
export default RouteView;